home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / exec / closelibrary.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  84 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: closelibrary.c,v 1.5 1996/10/24 15:50:46 aros Exp $
  4.     $Log: closelibrary.c,v $
  5.     Revision 1.5  1996/10/24 15:50:46  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:55:59  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:07  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang: english
  18. */
  19. #include <exec/execbase.h>
  20. #include <dos/dos.h>
  21. #include <aros/libcall.h>
  22.  
  23. /*****************************************************************************
  24.  
  25.     NAME */
  26.     #include <clib/exec_protos.h>
  27.  
  28.     AROS_LH1(void, CloseLibrary,
  29.  
  30. /*  SYNOPSIS */
  31.     AROS_LHA(struct Library *, library,A1),
  32.  
  33. /*  LOCATION */
  34.     struct ExecBase *, SysBase, 69, Exec)
  35.  
  36. /*  FUNCTION
  37.     Closes a previously opened library. It is legal to call this function
  38.     with a NULL pointer.
  39.  
  40.     INPUTS
  41.     library - Pointer to library structure or NULL.
  42.  
  43.     RESULT
  44.  
  45.     NOTES
  46.  
  47.     EXAMPLE
  48.  
  49.     BUGS
  50.  
  51.     SEE ALSO
  52.     OpenLibrary().
  53.  
  54.     INTERNALS
  55.  
  56.     HISTORY
  57.  
  58. ******************************************************************************/
  59. {
  60.     AROS_LIBFUNC_INIT
  61.  
  62.     /* Something to do? */
  63.     if(library!=NULL)
  64.     {
  65.     /* Single-thread the close routine. */
  66.     Forbid();
  67.  
  68.     /* Do the close */
  69.     (void)AROS_LVO_CALL0(BPTR,struct Library,library,2,);
  70.     /*
  71.         Normally you'd expect the library to be expunged if this returns
  72.         non-zero, but this is only exec which doesn't know anything about
  73.         seglists - therefore dos.library has to SetFunction() into this
  74.         vector for the additional functionality.
  75.     */
  76.  
  77.     /* All done. */
  78.     Permit();
  79.     }
  80.  
  81.     AROS_LIBFUNC_EXIT
  82. } /* CloseLibrary */
  83.  
  84.